package com.zhy.sping.controller;

import com.zhy.sping.config.SystemConfig;
import com.zhy.sping.service.intf.SearchHistoryService;
import com.zhy.sping.vo.R;
import org.elasticsearch.rest.RestRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/api/search/")
public class SearchHistoryController {
    @Autowired
    private SearchHistoryService service;

    @GetMapping("selectuid.do")
    public R selectUid(HttpServletRequest request){
        return service.selectByUid(request.getIntHeader(SystemConfig.HANDER_UID));
    }

}
